package com.gitee.ly.ymorm.transaction;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * Transaction
 *
 * @author ly
 **/
public interface Transaction {

    /**
     * Transaction get connection.
     */
    Connection getConnection() throws SQLException;

    /**
     * commit Transaction
     */
    void commit() throws SQLException;

    /**
     * rollback Transaction
     */
    void rollback() throws SQLException;

    /**
     * close Transaction
     */
    void close() throws SQLException;

    /**
     * Transaction getTimeout
     */
    Integer getTimeout();

}
